//=============================================================================
#ifndef _CPLAYER_H_
    #define _CPLAYER_H_

#include <string>
#include <vector>

#include <gl/gl.h>

#include "CNetworkStream.h"
#include "Stringify.h"

//=============================================================================
class CPlayer {
    public:
        static CPlayer PlayerList[MAX_CLIENTS];

    //Network
    public:
        std::string UID;

        int ID;
        int AreaID;

        int State;

    public:
        double X;
        double Y;

        double Width;
        double Height;

    public:
        CPlayer();

        bool OnLoad();

        void OnRender();

        void OnCleanup();

        std::string Serialize();

        void Unserialize(std::string Data);

        std::vector<CPlayer*> GetPlayersInProximity();

    public:
        static int Connect(std::string UID);

        static void Disconnect(std::string UID);
};

//=============================================================================

#endif
